<%--
  Created by IntelliJ IDEA.
  User: taohj
  Date: 2014/10/8
  Time: 16:10
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>

<div id="container_appthemeApps" style="width: 100%;min-height:500px;margin-top:100px;"></div>




<script>
    $(function () {



        $.post("/admin/reports/appthemeApps", {},function(result){
            console.info(result);


            var categories=new Array();
            var data=new Array();

            for(var i=0;i<result.length; i++){
                categories[i]=result[i].name;
                data[i]=result[i].total;
            }


            var chart = $('#container_appthemeApps').highcharts({
                chart: {
                    type: 'column'
                },
                title: {
                    text: '应用数量统计'
                },
                subtitle: {
                    text: ''
                },
                xAxis: {
                    categories: categories
                },

                yAxis: {
                    title: {
                        text: '应用数量'
                    }
                },

                tooltip: {
                    formatter: function() {

                        var s = this.x +':<b>'+ this.y;

                        return s;
                    }
                },
                series: [{
                    name: ' ',
                    data: data,
                    color: 'rgb(192,192,192)'
                }],
                exporting: {
                    enabled: false
                }
            }).highcharts(); // return chart

        },'json' );







    });
</script>